package com.caseeye.test

import com.caseeye.util.DateUtil
import com.caseeye.model.User
import com.caseeye.model.CaseMaster
import org.springframework.context.support.ClassPathXmlApplicationContext
import com.novus.casbah.mongodb.MongoDBObject

import com.novus.casbah.mongodb.Imports._
import com.caseeye.dao._
import com.caseeye.repository._
import com.caseeye.util.ClassUtils
import java.util.Date
import java.sql.Timestamp
import com.caseeye.base._

import net.lag.logging._
import net.lag.configgy._

object TestMongodb extends Application with Logging {

    val ctx = new ClassPathXmlApplicationContext("applicationContext.xml")
    val userDAO = ctx.getBean(classOf[UserDAO])
    userDAO.save({ new User() << "loginId" -> "qiaolei" << "userName" -> "Qiao Lei" << "password" -> "1234" << "lastLoginDate" -> DateUtil.now }.asInstanceOf[User])
}
